package com.rocpenghua.design.command;

/**
 * @author pengp
 * @date 2023年02月23日 11:02
 */
public class TurnOffLight implements Command {

    private Light light;

    public TurnOffLight(Light light) {
        this.light = light;
    }

    @Override
    public void execute() {
        light.Off();
    }

    @Override
    public void undo() {
        light.On();
    }

}
